<template>
  <div class="vab-app-main">
    <section>
      <vab-router-view />
    </section>
    <vab-footer />
  </div>
</template>

<script>
  // YourComponent.vue
  import store from '@/store'
  import { sendData, ws } from '@/utils/websocket'

  export default {
    name: 'VabAppMain',
    data() {
      return {
        datas: { code: 1, token: store.getters['user/token'] },
      }
    },
    created() {
      this.sendMsg()
    },
    methods: {
      //发送消息
      sendMsg() {
        sendData(this.datas, (res) => {
          console.log(res)
        })
      },
    },
  }
</script>
